#nullable disable
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;

using Blogs.LazyFox.Models;

namespace Blogs.LazyFox.Data
{
    public class BlogsContext : IdentityDbContext<PersonModel, IdentityRole, string>
    {
        public BlogsContext(DbContextOptions<BlogsContext> options)
            : base(options)
        {
        }

        // public DbSet<Blogs.LazyFox.Models.UserModel> Users { get; set; }
        public DbSet<Blogs.LazyFox.Models.PersonModel> Authors { get; set; }
        public DbSet<Blogs.LazyFox.Models.BlogModel> Blogs { get; set; }
        public DbSet<Blogs.LazyFox.Models.TagModel> Tags { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            // modelBuilder.Entity<BlogModel>()
            //     .HasOne(b => b.User)
            //     .WithMany(i => i.BlogModels)
            //     .HasForeignKey(b => b.Uid);
            base.OnModelCreating(modelBuilder);
            
        }
    }

}
